// 会员列表 / retailadmin / member / memberList
export default {
  data() {
    return {
      // 会员列表
      memberList: [],
      memberLoading: false
    }
  },
  methods: {
    // 获取会员列表
    async getMemberList(query = {}, callback) {
      this.memberLoading = true
      try {
        const res = await this.$api.customer.memberList({
          ...query,
          current_page: 1,
          page_number: 10000
        })
        if (res.code === 1) {
          this.memberList = res.data.records
          callback(res.data.records)
        }
        this.memberLoading = false
      } catch (error) {
        this.memberLoading = false
      }
    }
  }
}
